/*
 ============================================================================
 Name		: RSSBriefContainer.h
 Author	  : JohnLZeng
 Version	 : 1.0
 Copyright   : Your copyright notice
 Description : CRSSBriefContainer declaration
 ============================================================================
 */

#ifndef RSSBRIEFCONTAINER_H
#define RSSBRIEFCONTAINER_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <coecntrl.h>
#include <eikclb.h> 
#include <AknWaitDialog.h> //CAknWaitDialog

#include "XmlParseNotify.h"
// CLASS DECLARATION

/**
 *  CRSSBriefContainer
 * 
 */
class CRSSBriefContainer : 	public CCoeControl, MCoeControlObserver ,
							MParseEventNotify, MProgressDialogCallback
	{
public:
	// Constructors and destructor

	/**
	 * Destructor.
	 */
	~CRSSBriefContainer();

	/**
	 * Two-phased constructor.
	 */
	static CRSSBriefContainer* NewL(const TRect& aRect);

	/**
	 * Two-phased constructor.
	 */
	static CRSSBriefContainer* NewLC(const TRect& aRect);

private:

	/**
	 * Constructor for performing 1st stage construction
	 */
	CRSSBriefContainer();

	/**
	 * EPOC default constructor for performing 2nd stage construction
	 */
	void ConstructL(const TRect& aRect);

public:
	// Functions from base classes
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
	
	//MParseEventNotify
	void ParseEvent(const TInt& aEvent,void* aInfo);
	
	//MProgressDialogCallback
	void DialogDismissedL(TInt aButtonId);
private:
	// Functions from base classes
	void SizeChanged();
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl(TInt aIndex) const;
	void Draw(const TRect& aRect) const;
	void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);

	void SetIconsL();
	
	void StopWaitDialog();
	void StartWaitDialog(const TInt& aTextResourceId);
	
	void ParseSuccess(void* aInfo);
public:	
	void Clear();
	
	void UpdateDisplay();
	
	void ScanLocal();	
	void RequestOnline();
	
	void Read();
	
	void Remove();
	void SetNew();
	void SetOld();
	
	void PlayAll();
	void ClearAll();
private:
	//data
	CEikColumnListBox* iListBox;
	CAknWaitDialog* iWaitDialog;
	};

#endif // RSSBRIEFCONTAINER_H
